#*--encoding:UTF-8--*

'''
太健康·百万全家桶
'''

'''
整理数据
'''
from common.helper import Helper
from db.mysql import MysqlClient

class Arrangement( object ):

    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "太健康·百万全家桶"

    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "太平洋保险"
            data["year"] = item["year"]
            data["socialSec"] = item["socialSec"]
            data["plan"] = "家庭款" if item["productCode"] == "TPY_ZGDZYYLBX_TD" else "个人款"
            data["specialMedical"] = "0" if item["specialTre"] == "planB" else "1"
            data["payObject"] = item["payObject"]
            data["money"] = "100w"
            data["expire"] = "1年"
            data["price"] = item["price"]
            Helper.mergeTable(self.name, self.mysql, data)
